cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

project(dmd)

find_package(PCL 1.6.0 REQUIRED)
find_package(Qt4 REQUIRED)
FIND_PACKAGE( OpenCV REQUIRED )

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})



include_directories(${PCL_INCLUDE_DIRS}
					${CMAKE_SOURCE_DIR}/dmd/libs/tinyxml2/include
					${CMAKE_SOURCE_DIR}/dmd/libs/libcitygml/include)
					
link_directories(${PCL_LIBRARY_DIRS}
				${CMAKE_SOURCE_DIR}/dmd/libs/tinyxml2/lib
				${CMAKE_SOURCE_DIR}/dmd/libs/libcitygml/lib)
				
add_definitions(${PCL_DEFINITIONS})

include_directories( include )
file( GLOB header_list include/*.h )
file( GLOB source_list src/*.cpp )

QT4_WRAP_CPP(moc_srcs ${header_list}  OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)

SOURCE_GROUP("Generated" FILES

  ${moc_srcs}
)

add_library (dmd ${moc_srcs} ${source_list} ${header_list})
target_link_libraries (dmd ${PCL_LIBRARIES} ${QT_LIBRARIES} citygml tinyxml2)